home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_10 / milam / date.c < prev    next >
Text File  |  1994-07-12  |  867b  |  25 lines

  1. /***************************************************************/
  2. /*            (c) Copyright 1993 by Stan Milam                 */
  3. /*                                                             */
  4. /***************************************************************/
  5.  
  6. date_t date( date_t *arg ) {
  7.  
  8.     date_t rv;
  9.  
  10.     /***********************************************************/
  11.     /* Use time_to_date() which uses the ANSI time() function  */
  12.     /* to do the actual date conversion.                       */
  13.     /***********************************************************/
  14.  
  15.     rv = time_to_date( time( NULL ) );
  16.  
  17.     /***********************************************************/
  18.     /* If an argument is supplied put the value in it.         */
  19.     /***********************************************************/
  20.  
  21.     if ( arg != NULL ) *arg = rv;
  22.     return rv;
  23. }
  24.  
  25.